1. Field of the Invention
The present invention relates to an image processing apparatus and an image processing method. More particularly, the present invention relates to technology for reducing circuit size and increasing data access speeds when quantizing image data according to error diffusion.
2. Description of the Related Art
Processing by error diffusion is known as a quantization process for converting multi-valued image data into data with a fewer number of gradations, in order to obtain print data used by a printing apparatus. With error diffusion, quantization is performed on one line of pixels arranged in a given direction, in such a manner that quantization is performed from a pixel at one of the ends of the line to the pixel at the other end, in this order. In this case, the error produced by the quantization of each pixel is diffused to pixels on the same line as the target pixel being quantized, as well as to pixels on a line adjacent to that line, in a direction orthogonal to the given direction. When quantization for one line of pixels is finished, similar quantization is performed on the next adjacent line of pixels. In this manner, all lines constituting image data are successively quantized.
With this quantization, the error data diffused to pixels on the same line is, for example, saved in a buffer on a circuit that executes error diffusion until the quantization of those pixels of the line has finished. Also, one line of error data diffused to pixels of an adjacent line is stored in a memory, except for the circuit, and read out from the memory, as pixels on that adjacent line are processed on quantizing for that adjacent line.
In recent printing apparatuses, more types or colors of ink have come to be used, in order to improve color reproducibility. Also, there is a tendency for the image data handled by a printing apparatus to increase in an amount compared to the prior printing apparatus, due to the printed images becoming more detailed, and the printing paper becoming larger in size. For this reason, there is a demand to process large amounts of image data faster, and particularly, there is a demand for faster quantization processing by error diffusion. Furthermore, it is desirable to realize the faster processing without increasing the circuit size and, also, without increasing costs.
Japanese Patent Laid-Open No. H10-164365 (1998) discloses a configuration for executing error diffusion processing wherein the line memory in a circuit for error diffusion processing is a line memory for a number of pixels that is less than one line of pixels. According to this configuration, it becomes possible to easily realize an error diffusion processing circuit as an ASIC and to make error diffusion processing faster.
However, with an error diffusion processing configuration of the prior art, as disclosed in Japanese Patent Laid-Open No. H10-164365 (1998), one line of error data to be diffused to pixels on other lines is written to or read from the memory outside of the error diffusion circuit. For this reason, such a configuration requires a comparatively large amount of time for memory access. More particularly, error data write and read times become even longer in the case when the memory outside of the error diffusion circuit is a memory with comparatively slow operating speeds, such as DRAM. Furthermore, since the data subjected to error diffusion processing increases as factors, such as the types and colors of the ink or other printing materials increase, the amount of error data to be written or read also increases, which further hinders faster error diffusion processing. There is an additional problem in that the circuit size of the error diffusion processing circuit also gets larger as the data subjected to error diffusion processing increases due to increases in factors, such as the types and colors of the printing materials.